<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" type="text/css" href="../img-font/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/css.css" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<script src="../js/jquery.min.js"></script>
		<script src="../js/main.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="../js/Url.js"></script>
		<title></title>
		<style type="text/css">
			.record-external {
				width: 100%;
				height: 100%;
				background: #ebebeb;
			}
			
			.record {
				width: 100%;
				height: 40px;
				text-align: center;
				background: #666;
				line-height: 40px;
				color: #fff;
			}
			
			nav {
				height: 100%;
				background: #fff;
				overflow-y: scroll;
				font-size: 14px;
				margin-top: 50px;
				padding: 5px;
			}
			
			.fanjian {
				height: 100%;
				display: block;
				color: #000;
				font-size: 24px;
				line-height: 30px;
				float: left;
				text-indent: 24px;
				position: absolute;
				top: 10px;
				left: 0;
			}
			
			.order {
				display: flex;
				padding: 10px 0;
			}
			
			.order_left {
				flex: 1.5;
				height: 46.5px;
			}
			
			.order_centent {
				flex: 7;
				height: 46.5px;
				text-align: center;
				line-height: 24px;
				color: #fff;
				background: ;
			}
			
			.order_centent p {
				height: 50%;
			}
			
			.order_centent p:nth-child(1) {
				background: #0094ff;
			}
			
			.order_centent p:nth-child(2) {
				background: #c2d7ac;
			}
			
			.order_right {
				flex: 1.5;
				text-align: center;
				line-height: 46.5px;
			}
			
			.order_right a {
				display: block;
				width: 100%;
				height: 100%;
			}
			.attrts p{
				text-align: center;
			}
			.attrts{
				border-top: 1px solid #eee;
				border-bottom: 1px solid #eee;
			}
			.zhifu a{
				color: #666;
			}
		</style>
	</head>

	<body>
		<!--纪录列表-->
		<div class="record-external">
			<div class="topnav">
				<a href="javascript:history.go(-1)"><span class="fanjian iconfont icon-xia"></span></a>用户订单纪录
			</div>
			<nav>
				<div class="order">

				</div>
			</nav>
		</div>
	</body>

</html>
<script type="text/javascript">
	//时间转换
	function getLocalTime(nS) {
		return new Date(parseInt(nS)).toLocaleString().substr(0, 17)

	}
	//	expendTime
	$(function() {
		$.ajax({
			type: "get",
			url: baseUrl + "foot/user/getUserOrderRecord",
			contentType: "application/json; charset=utf-8",
			success: function(res) {
				console.log(res)
				if(res.error_code == 0) {
					for(var i = 0; i < res.data.length; i++) {
						var str = '';
						str += '<div class="attrts">';
						str += '<div class="order">';
						str += '<div class="order_left"><img src="' + baseUrl+ res.data[i].awardImgUrl + '" width="100%" height="100%" /></div>';
						str += '<div class="order_centent">';
						str += '<p>物品: ' + res.data[i].awardContent + '</p>';
						str += '<p>快递费：' + res.data[i].orderMoney + ' 元</p>';
						str += '</div>';
						str += '<div class="order_right"><a href="OrderDetails.html?id=' + res.data[i].orderId + '">详情</a></div>';
						str += '</div>'
						if (res.data[i].paymentStatus==0) {
							str+='<p class="zhifu"><a href="#">已付款</a></p>'
						}else{
							str+='<p><a href="	/footballgame/payment.html?openId='+res.data[i].openId+'&orderId='+res.data[i].orderId+'&status=1">未付款</a></p>'
						}
						
						str += '</div>'
						$('nav').append(str)
					}
				}

			}
		});
	})
</script>
